\documentclass[a4paper]{article}
\usepackage{tikz}
\usetikzlibrary{shapes,automata,snakes,backgrounds}
\usepackage[outputdir={tmptmp/}]{../dot2texi}

\begin{document}

\begin{figure}
\centering
\begin{dot2tex}[circo]
digraph G {
    mindist = 0.5;
    node [shape="circle"];
    a -> b [topath="bend right"];
    c -> b [topath="bend left"];
    c -> a [topath="out=10,in=-90"];
    b -> b [topath="loop above"];
}
\end{dot2tex}
\caption{Simple graph with custom paths}
\end{figure}

\begin{dot2tex}[neato,tikzedgelabels]
graph G {
    node [shape=circle,style="fill=red!20"];
    edge [lblstyle="fill=black!10,inner sep=1pt,sloped"];
    K -- F [label="120"];
    H -- S [label="650"];
    H -- M [label="780"];
    D -- B [label="490"];
    D -- M [label="600"];
    B -- M [label="580"];
    H -- N [label="600"];
    F -- H [label="490"];
    S -- B [label="630"];
    S -- N [label="210"];
    S -- M [label="230"];
    F --M [label="100"];
    M -- K [label="test"];
}
\end{dot2tex}

\begin{dot2tex}[neato,tikz]
digraph G {
    d2tfigpreamble = "\tikzstyle{every state}= \
    [draw=blue!50,very thick,fill=blue!20]";
    node [style="state"];
    edge [lblstyle="auto",topath="bend left"];
    A [style="state, initial"];
    A -> B [label=2];
    A -> D [label=7];
    B -> A [label=1];
    B -> B [label=3,topath="loop above"];
    B -> C [label=4];
    C -> F [label=5];
    F -> B [label=8];
    F -> D [label=7];
    D -> E [label=2];
    E -> A [label="1,6"];
    F [style="state,accepting"];
}
\end{dot2tex}

\begin{dot2tex}[straightedges,fdp]
graph G {
    node [shape=circle, fixedsize=True, width="0.2",
          style="ball color =green", label=""];
    edge [style="snake=zigzag, green"];
    a_1 -- c -- a_2;
    c [style="ball color=black"];
    edge [style="snake=snake, blue"];
    node [style="ball color = red", label=""];
    a_3 -- c -- a_4 --a_3;
}
\end{dot2tex}

\begin{dot2tex}[mathmode,autosize,shell]
digraph G {
    node [shape=circle];
    a_1 [texlbl="$x^2+\frac{\sin y}{y^2+\cos \beta}+\gamma_3$"];
    a_1 -> a_2 [label=" ", texlbl="$x_1+x_3^2+z+c+v~~$"];
    a_2 -> a_1;
}
\end{dot2tex}

\end{document}
